package com.antaohua.tools.api.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.antaohua.tools.framework.base.interfase.CreateDateInterfase;
import com.antaohua.tools.framework.base.interfase.UpdateDateInterfase;
import com.antaohua.tools.framework.base.model.UUIDIdentityModel;

@Entity
@Table(name="interface_path")
public class InterfacePathEntity extends UUIDIdentityModel implements Serializable, CreateDateInterfase, UpdateDateInterfase{

	

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	
	@Column(name ="name",length=100,nullable=false,unique=true)
	private String name;
	
	@Column(name ="url",length=100,nullable=false)
	private String url;
	
	@Column(name ="code",length=100,nullable=false,unique=true)
	private String code;
	
	@Column(name ="host",length=100,nullable=false)
	private String host;
	
	@Column(name ="validate",nullable=false)
	private Boolean isValidate;
	
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "provider_id", insertable = false, updatable = false)
	private InterfaceProviderEntity provider;

	@Column(name = "provider_id", length = 36, nullable = false,columnDefinition="char(36)")
	private String providerId;
	
	
	
	
	@Column(name = "CREATEDATE", nullable = false)
	private Date createDate;
	@Column(name = "UPDATEDATE")
	private Date updateDate;


	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}


	@Column(name ="remark",length=1000)
	private String remark;
	
	
	
	public String getRemark() {
		return remark;
	}


	public void setRemark(String remark) {
		this.remark = remark;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}


	public InterfaceProviderEntity getProvider() {
		return provider;
	}


	public void setProvider(InterfaceProviderEntity provider) {
		this.provider = provider;
	}


	public String getCode() {
		return code;
	}


	public void setCode(String code) {
		this.code = code;
	}
	
	
	public String getHost() {
		return host;
	}


	public void setHost(String host) {
		this.host = host;
	}
	
	
	public Boolean getIsValidate() {
		return isValidate;
	}


	public void setIsValidate(Boolean isValidate) {
		this.isValidate = isValidate;
	}


	public String getProviderId() {
		return providerId;
	}


	public void setProviderId(String providerId) {
		this.providerId = providerId;
	}
	
	
}
